<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-bind</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>
<body>
    <div id="app">
      

      <img :src="imgSrc" alt="">
<!--  -->


<div class="input-num">
  <!-- v-on 可缩写为 @ 符号 -->
  <button @click="decr">-</button>
  <span>{{cnt}}</span>
  <button @click="incr">+</button>
  <span>哈哈哈  {{ show() }}</span>

</div>

      </div> 

</body>
</html>

<script>
    var app = new Vue({
  el: '#app',
  data: {
    cnt:0,
    imgSrc: 'https://img.52z.com/upload/news/image/20190722/20190722080701_54022.jpg'
  },
  methods:{
    incr : function(){
      this.cnt++;
    },
    decr : function () {
      this.cnt--;
    },
    show : function(){
      return 'hhh'
    }
  }
})
</script>